<script language="javascript" type="text/javascript" src="/assets/My97DatePicker/jquery-1.8.2.js"></script>
<style>
    #ribbon{
        display:none;
    }
    body{
        background: none;
    }
    .c_box{
        margin:5px;
        cursor: pointer;
    }
    .cur{
        color:red;
    }
</style>
<script>
    function product_mark_del(btn,id){
        var pid="{$pid}";
        $.ajax({
            type: "post",
            url: "/admin/product/product_save_del",
            data: {"id":id,"pid":pid},
            dataType: "json",
            success: function(data){
                if(data){
                    $(btn).parents().parents('.box12').remove();
                }else{
                    alert("删除失败");
                }
            }
        });

    }
</script>

<form action="" method="post" id="add-form">

    <div style="margin-bottom: 5px; margin-top: 20px;">
        {volist name="type" id="type_mark" key="k"}
        <a href="/admin/product/index_product_mark?pid={$pid}&type={$k-1}" class="c_box {if condition='$search eq $k-1'}cur{/if}">{$type_mark}</a>
        {/volist}
    </div>
<table  class="table table-striped table-bordered table-hover table-nowrap" data-operate-edit="1">
    <thead>
    <tr>
        <th class="bs-checkbox " style="text-align: center; vertical-align: middle;width:10%;height: 45px;" data-field="0">ID</th>
        <th style="text-align: center; vertical-align: middle;width:10%;" data-field="id">
            <div class="th-inner ">排序</div>
            <div class="fht-cell"></div>
        </th>
        <th style="text-align: center; vertical-align: middle;width:30%;" data-field="id">
            <div class="th-inner ">已选标签</div>
            <div class="fht-cell"></div>
        </th>
        <th style="text-align: center; vertical-align: middle;width:20%;" data-field="id">
            <div class="th-inner ">应用场景</div>
            <div class="fht-cell"></div>
        </th>
        <th style="text-align: center; vertical-align: middle;width:20%;" data-field="id">
            <div class="th-inner ">所属样式</div>
            <div class="fht-cell"></div>
        </th>
        <th style="text-align: center; vertical-align: middle;width:20%;" data-field="id">
            <div class="th-inner ">操作</div>
            <div class="fht-cell"></div>
        </th>

    </tr>
    </thead>
    <tbody data-listidx="0">
    {volist name="list" id="vo"}
    <tr data-index="0" class="box12">
        <td style="text-align: center; vertical-align: middle; ">{$vo.id}</td>
        <td style="text-align: center; vertical-align: middle; ">
           <input name="m_order[{$vo['id']}]" value="{$vo.m_order}" type="number" min="0" style="width:50px;"/>
        </td>
        <td style="text-align: center; vertical-align: middle; ">{$vo.mark_info}</td>
        <td style="text-align: center; vertical-align: middle; ">
            <select name="senec[{$vo['id']}]" style="height:40px;">
                {volist name="senec" id="v" key="k"}
                <option value="{$k}" {if condition="$vo.senec eq $k"}selected="selected"{/if} >{$v}</option>
                {/volist}
            </select>
        </td>
        <td style="text-align: center; vertical-align: middle; ">
            <select name="stylename[{$vo['id']}]" style="height:40px;">
                {volist name="stylename" id="v1" key="k"}
                <option value="{$k}" {if condition="$vo.stylename eq $k"}selected="selected"{/if}>{$v1}</option>
                {/volist}
            </select>
        </td>
        <td style="text-align: center; vertical-align: middle; ">
            <span class="btn btn-danger btn-add add_product" onclick="product_mark_del(this,{$vo.id});">删除</span>
        </td>
    </tr>
    {/volist}
    <tr>
        <td colspan="5" style="padding-left:18px; ">
            <input type="submit" value="提交" class="group_btn" />
        </td>
    </tr>
    </tbody>
</table>
</form>

<!--
<script>
    $(".group_btn").click(function () {
        $("#add-form").submit()
    })
</script>-->
